home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Magazine / Online / QMail / source / tryshsgr.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-15  |  270 b   |  15 lines

  1. void main()
  2. {
  3.   short x[4];
  4.  
  5.   x[0] = x[1] = 1;
  6.   if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
  7.  
  8.   if (getgroups(1,x) == -1) _exit(1);
  9.   if (x[1] != 1) _exit(1);
  10.   x[1] = 2;
  11.   if (getgroups(1,x) == -1) _exit(1);
  12.   if (x[1] != 2) _exit(1);
  13.   _exit(0);
  14. }
  15.